package nccloud.web.gl.voucher.action;

import java.util.Map;

import com.alibaba.fastjson.JSONArray;

import nc.bs.voucher.itf.IVourcherSumService;
import nc.vo.pub.BusinessException;
import nccloud.framework.core.exception.ExceptionUtils;
import nccloud.framework.service.ServiceLocator;
import nccloud.framework.web.action.itf.ICommonAction;
import nccloud.framework.web.container.IRequest;
import nccloud.framework.web.json.JsonFactory;

/**
 * 凭证汇总选择中辅助核算
 * @author Administrator
 * @date 2024年2月21日
 */
public class AssitCountSumAction implements ICommonAction {
	
	@SuppressWarnings("rawtypes")
	@Override
	public Object doAction(IRequest request) {
		String json = request.read();
		Map valMap = JsonFactory.create().fromJson(json, Map.class);
		try {
			IVourcherSumService service = ServiceLocator.find(IVourcherSumService.class);
			JSONArray jsonarr = service.handlerchildrendatas((String)valMap.get("pk_voucher"), (String)valMap.get("pk_accountingbook"));
			return jsonarr;
		} catch (BusinessException var8) {
			ExceptionUtils.wrapException(var8);
			return null;
		}
	}

}
